USE[DeltaFlex]
GO
IF(OBJECT_ID('dbo.sp_CercarNextIdOrdreTreball')IS NOT NULL)
	DROP PROCEDURE dbo.sp_CercarNextIdOrdreTreball
GO

CREATE PROCEDURE sp_CercarNextIdOrdreTreball
AS
BEGIN
	SET NOCOUNT ON
	SELECT NEXT VALUE FOR SEQ_ORDRE_TREBALL as IDORDRE;
	END 
GO